Skip to content

Conversation

@ellemouton
Copy link
Member

This is the last PR for preparing the sessions Store to be ready for a SQL implementation.
3 unrelated tiny commits - see commit messages for details :)

We only really ever use it in one place and even then, only for a
session State that we no longer use anymore.

This is done to make the SQL queries we will need to implement the SQL
Store more simple.
Before we add the SQL implementation of the store, we fix this timestamp
to be a more realistic number. This is needed since in sqlite,
timestamps are serialised as strings and golang actually cant parse the
string for the current timestamp back into a time.Time. This is the
error that will be encountered:
`parsing time "99999-01-01 00:00:00 +0000 UTC" as "2006-01-02
15:04:05.999999999 -0700 MST": cannot parse "9-01-01 00:00:00 +0000 UTC"
as "-"`
This will make it possible in SQL unit tests to extract the BaseDB used
for accounts and use it to init another Store backed by the same BaseDB.
@ellemouton ellemouton self-assigned this Mar 2, 2025
@ellemouton ellemouton added sql-ize no-changelog This PR is does not require a release notes entry labels Mar 2, 2025
@ellemouton ellemouton requested review from ViktorT-11 and bitromortac and removed request for ViktorT-11 March 2, 2025 12:12
Copy link
Contributor

@ViktorT-11 ViktorT-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT 🚀

Copy link
Contributor

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡

@ellemouton ellemouton merged commit 64dba89 into lightninglabs:master Mar 4, 2025
20 of 21 checks passed
@ellemouton ellemouton deleted the sql19Sessions11 branch March 4, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR is does not require a release notes entry sql-ize

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants